layui.use(['table'], function () {
    let table = layui.table;
    let form = layui.form;
    let $ = layui.jquery;

    table.render({
        elem: '#findHistoricalEvent',
        url: '/historicalEvent/findHistoricalEvent',
        page: true,
        height: '500px',
        cols: [
            [
                {
                    field: 'destroyerNumber',
                    title: "驱逐舰编号",
                    align: 'center',
                    sort: true
                },
                {
                    field: 'startTime',
                    title: "开始时间",
                    align: 'center'
                },
                {
                    field: 'endTime',
                    title: "结束时间",
                    align: 'center'
                },
                {
                    field: 'longitude',
                    title: '经度',
                    align: "center"
                },
                {
                    field: 'latitude',
                    title: '纬度',
                    align: "center"
                },
                {
                    field: 'eventType',
                    title: '事件类型',
                    align: "center"
                }
            ]
        ],
        limits: [1, 3, 5, 7, 9],
        limit: 3,
        done: function (res, curr, count) {
            $("[lay-id='findHistoricalEvent']>.layui-table-page").css({
                "text-align": "center"
            });
        }
    });
});